# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Scalar-List-Utils
pkgname=perl-${_realname}
pkgver=1.50
pkgrel=1
pkgdesc="A selection of general-utility list subroutines"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/Scalar-List-Utils"
groups=('perl-modules')
depends=('perl')
license=('GPL' 'PerlArtistic')
source=("https://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Scalar-List-Utils-${pkgver}.tar.gz")
sha256sums=('06aab9c693380190e53be09be7daed20c5d6278f71956989c24cca7782013675')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
